using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.SharePoint;

namespace WMOSSExperts.Fields
{
    public class RelatedLookupLinksValue
    {
        public RelatedLookupLinksValue(String value)
        {
            String[] values = value.Split(new string[] { ";#;" }, StringSplitOptions.RemoveEmptyEntries);
            if (values.Length == 4)
            {
                //Check the reverse lookup to find the child sourceList and web
                reverseLookupId = ParserHelper.ParseStringToGuid(values[0]);
                filteredViewId = ParserHelper.ParseStringToGuid(values[1]);
                childList = values[2];
                Boolean.TryParse(values[3], out displayChildItems);
            }

        }

        private Guid reverseLookupId = Guid.Empty;
        public Guid ReverseLookupId
        {
            get
            {
                return reverseLookupId;
            }
            set
            {
                reverseLookupId = value;
            }
        }

        private Guid filteredViewId = Guid.Empty;
        public Guid FilteredViewId
        {
            get
            {
                return filteredViewId;
            }
            set
            {
                filteredViewId = value;
            }
        }

        private String childList = String.Empty;
        public String ChildList
        {
            get { return childList; }
            set { childList = value; }
        }

        private Boolean displayChildItems;
        public Boolean DisplayChildItems
        {
            get { return displayChildItems; }
            set { displayChildItems = value; }
        }



    }
}
